import request from '@/utils/request'
import axios from 'axios'
// 左侧流域查询
export function GetBasinList () {
    return request({
        url: '/api/Basin/GetBasinList',
        method: 'post'
    })
}
// 实测降雨
export function GetBasinStationRainList (sensorType) {
    return request({
        url: '/api/Basin/GetBasinStationRainList',
        method: 'get',
        params: sensorType,
        cancelToken: new axios.CancelToken(function executor (canceler) {
            GetBasinStationRainList.canceler = canceler
            window.cancelApi['GetBasinStationRainList'] = canceler
        })
    })
}
// 预报降雨
export function GetWeatherRain (sensorType) {
    return request({
        url: '/api/PredictionRainfall/GetWeatherRain',
        method: 'get',
        params: sensorType
    })
}
// 站点详情 雨量
export function GetRainInfo (sensorType) {
    return request({
        url: '/api/Basin/GetRainInfo',
        method: 'get',
        params: sensorType
    })
}
// 站点详情 周边村庄
export function GetSurroundingVillageBySt (sensorType) {
    return request({
        url: '/api/Basin/GetSurroundingVillageBySt',
        method: 'get',
        params: sensorType
    })
}
// 站点详情 周边村庄
export function GetStationInfo (sensorType) {
    return request({
        url: '/api/Basin/GetStationInfo',
        method: 'get',
        params: sensorType
    })
}
// 预警  风险预警
export function GetEarlyWarningList (sensorType) {
    return request({
        url: '/api/EarlyWarning/GetEarlyWarningList',
        method: 'get',
        params: sensorType
    })
}
// 预警  风险预警 详情
export function GetEarlyWarningStatistics (sensorType) {
    return request({
        url: '/api/EarlyWarning/GetEarlyWarningStatistics',
        method: 'get',
        params: sensorType
    })
}
// 预警  预报预警列表
export function GetForcastWarningStatistics (sensorType) {
    return request({
       // url: '/api/EarlyWarning/GetForcastWarningStatistics',
        url: '/api/EarlyWarning/GetForcastWarningList',//2023-8-8 新
        method: 'get',
        params: sensorType
    })
}
// 预警  预报预警列表
export function GetForcastWarningStatisticsDeatil (sensorType) {
    return request({
       // url: '/api/EarlyWarning/GetForcastWarningStatisticsDeatil',
        url: '/api/EarlyWarning/GetForcastWarningListDeatil',//2023-8-8 新
        method: 'get',
        params: sensorType
    })
}
// 预演 选择降雨列表
export function GetForcastFileList (sensorType) {
    return request({
        url: '/api/Rehearsal/GetForcastFileList',
        method: 'get',
        params: sensorType
    })
}
// 预演 选择降雨图表
export function GetWswcdAreLP (sensorType) {
    return request({
        url: '/api/Rehearsal/GetWswcdAreLP',
        method: 'get',
        params: sensorType
    })
}

// 预演 获取隐患预设方案
export function GetPHDList (sensorType) {
    return request({
        url: '/api/HiddenDanger/GetPHDList',
        method: 'post',
        params: sensorType
    })
}
// 预演 选择降雨列表
export function GetPHDDetailList (sensorType) {
    return request({
        url: '/api/HiddenDanger/GetPHDDetailList',
        method: 'get',
        params: sensorType
    })
}

// 预演 查询历史场次接口
export function GetRSiteList (sensorType) {
    return request({
        url: '/api/Rehearsal/GetRSiteList',
        method: 'get',
        params: sensorType
    })
}

// 预演 新增历史场次接口
export function CreateRSite (sensorType) {
    return request({
        url: '/api/Rehearsal/CreateRSite',
        method: 'post',
        data: sensorType
    })
}
// 预演 历史复盘获取图表接口
export function GetWsWscdPByStcdP (sensorType) {
    return request({
        url: '/api/Rehearsal/GetWsWscdPByStcdP',
        method: 'get',
        params: sensorType
    })
}
// 预演 雨型列表接口
export function GetRPList () {
    return request({
        url: '/api/Rehearsal/GetRPList',
        method: 'get'
    })
}

// 预演 雨型列表接口
export function GetExtremesWswscdAreaP (sensorType) {
    return request({
        url: '/api/Rehearsal/GetExtremesWswscdAreaP',
        method: 'get',
        params: sensorType
    })
}

// 预演 雨型列表接口
export function GetWswscdPByP (sensorType) {
    return request({
        url: '/api/Rehearsal/GetWswscdPByP',
        method: 'get',
        params: sensorType
    })
}
// 预演 雨型列表接口
export function CreateRehearsal (sensorType) {
    return request({
        url: '/api/Rehearsal/CreateRehearsal',
        method: 'post',
        data: sensorType
    })
}

// 预演 左侧列表
export function GetRLList (sensorType) {
    return request({
        url: '/api/Rehearsal/GetRLList',
        method: 'post',
        data: sensorType
    })
}
// 预演 方案详情
export function SelRehearsal (sensorType) {
    return request({
        url: '/api/Rehearsal/SelRehearsal',
        method: 'get',
        params: sensorType
    })
}
// 预演 方案删除
export function DeleteRehearsal (sensorType) {
    return request({
        url: '/api/Rehearsal/DeleteRehearsal',
        method: 'get',
        params: sensorType
    })
}
// 预演 风险评估
export function GetRiskDrowning (sensorType) {
    return request({
        url: '/api/CalcPreview/GetRiskDrowning',
        method: 'get',
        params: sensorType
    })
}
// 预演期间 风险评估动态数据 
export function GetRiskDrowningDetail (sensorType) {
    return request({
        url: '/api/CalcPreview/GetRiskDrowningDetail',
        method: 'get',
        params: sensorType
    })
}
// 预警 获取短信发送人
export function GetSendPersonByAddvcd (sensorType) {
    return request({
        url: '/api/SendMessage/GetSendPersonByAddvcd',
        method: 'get',
        params: sensorType
    })
}

// 预警 获取短信发送人
export function GetProviceMessage (sensorType) {
    return request({
        url: '/api/SendMessage/GetProviceMessage',
        method: 'get',
        params: sensorType
    })
}

// 忽略预警
export function IngoneWarning (sensorType,urls) {
    return request({
      //  url: '/api/EarlyWarning/IngoneWarning',
      //  url: '/api/EarlyWarning/IngoneShortWarning',//2023-8-8 临近预警
        url:urls,
        method: 'get',
        params: sensorType
    })
}
// 忽略预警
export function CalcRehearsalScheme (sensorType) {
    return request({
        url: '/api/CalcPreview/CalcRehearsalScheme',
        method: 'get',
        params: sensorType
    })
}

// 淹没过程
export function GetDrowningProcess (sensorType) {
    return request({
        url: '/api/CalcPreview/GetDrowningProcess',
        method: 'get',
        params: sensorType
    })
}

// 预案列表
export function GetPlanList (sensorType) {
    return request({
        url: '/api/Plan/GetPlanList',
        method: 'get',
        params: sensorType
    })
}
// 预案统计
export function PlanStatistics (sensorType) {
    return request({
        url: '/api/Plan/PlanStatistics',
        method: 'get',
        params: sensorType
    })
}
// 预案统计
export function DeletePlan (sensorType) {
    return request({
        url: '/api/Plan/DeletePlan',
        method: 'get',
        params: sensorType
    })
}
// 预案上传
export function UploadFloodPlan (sensorType) {
    return request({
        url: '/api/Plan/UploadFloodPlan',
        method: 'post',
        data: sensorType
    })
}

// 预案上传
export function InsertFloodPlan (sensorType) {
    return request({
        url: '/api/Plan/InsertFloodPlan',
        method: 'post',
        data: sensorType
    })
}
// 预演计算状态
export function GetRehearsalState (sensorType) {
    return request({
        url: '/api/Rehearsal/GetRehearsalState',
        method: 'get',
        params: sensorType
    })
}

// 预演 获取大流域频率列表
export function GetRainDesign (sensorType) {
    return request({
        url: '/api/Rehearsal/GetRainDesign',
        method: 'get',
        params: sensorType
    })
}

// 预案可视化左侧村庄列表
export function PlanStatisticsByAddvcd (sensorType) {
    return request({
        url: '/api/Plan/PlanStatisticsByAddvcd',
        method: 'get',
        params: sensorType
    })
}

// 预案可视化左侧列表 数据
export function GetPlanListByAdcd (sensorType) {
    return request({
        url: '/api/Plan/GetPlanListByAdcd',
        method: 'get',
        params: sensorType
    })
}
// 组织架构列表
export function GetPlanOrganizationUseList (sensorType) {
    return request({
        url: '/api/Plan/GetPlanOrganizationUseList',
        method: 'get',
        params: sensorType
    })
}
// 组织架构
export function GetPlanOrganizationList (sensorType) {
    return request({
        url: '/api/Plan/GetPlanOrganizationList',
        method: 'get',
        params: sensorType
    })
}
// 组织架构
export function GetPlanBasicList (sensorType) {
    return request({
        url: '/api/Plan/GetPlanBasicList',
        method: 'get',
        params: sensorType
    })
}
// 雨水情
export function GetRehearsalPZ (sensorType) {
    return request({
        url: '/api/Plan/GetRehearsalPZ',
        method: 'get',
        params: sensorType
    })
}
// 对照信息
export function GetRehearsalWarning (sensorType) {
    return request({
        url: '/api/Plan/GetRehearsalWarning',
        method: 'get',
        params: sensorType
    })
}
// 防御建议
export function GetRiskDrowningList (sensorType) {
    return request({
        url: '/api/CalcPreview/GetRiskDrowningList',
        method: 'get',
        params: sensorType
    })
}

// 风险网格
export function GetDangerGrid (sensorType) {
    return request({
        url: '/api/Plan/GetDangerGrid',
        method: 'get',
        params: sensorType
    })
}

// 首页 概览
export function GetWswscdInfo (sensorType) {
    return request({
        url: '/api/Plan/GetWswscdInfo',
        method: 'get',
        params: sensorType
    })
}

// 首页 预报降雨
export function GetIndexRain (sensorType) {
    return request({
        url: '/api/PredictionRainfall/GetIndexRain',
        method: 'get',
        params: sensorType
    })
}

// 首页 河道流量
export function GetIndexStatistics (sensorType) {
    return request({
        url: '/api/FloodAnalysis/GetIndexStatistics',
        method: 'get',
        params: sensorType
    })
}

// 首页 三种统计
export function GetAllWarningStatistics (sensorType) {
    return request({
        url: '/api/EarlyWarning/Getstatistics',
        method: 'get',
        params: sensorType
    })
}

// 预报降雨1h 3h 预报
export function GetShortRain3H (sensorType) {
    return request({
        url: '/api/PredictionRainfall/GetShortRain3H',
        method: 'get',
        params: sensorType
    })
}
// 雷达测雨过程 
export function GetRadarRainInfo (sensorType) {
    return request({
        url: '/api/Basin/GetRadarRainInfo',
        method: 'get',
        params: sensorType
    })
}
//获取 村庄关联站点  
export function GetStcdByAdcd (sensorType) {
    return request({
        url: '/api/PredictionRainfall/GetStcdByAdcd',
        method: 'get',
        params: sensorType
    })
}


